<template>
  <div class="app-container">
    <el-card>
      <el-table
        v-loading="listLoading"
        :data="list"
        border
        fit
        :header-cell-style="{background:'#f5f7fa'}"
        max-height="650"
        highlight-current-row
        style="width: 100%;"
      >
        <el-table-column label="分类" align="center" prop="category" width="150" />
        <el-table-column label="文件名(点击可预览)" align="left">
          <template slot-scope="{row}">
            <span class="link-type" @click="onlineRead(row)"> {{ row.name }} </span>
          </template>
        </el-table-column>
        <el-table-column
          label="操作"
          align="center"
          width="150px"
        >
          <template slot-scope="{row}">
            <el-button
              type="primary"
              size="mini"
              plain
              icon="el-icon-download"
              @click.native="downloadFile(row)"
            > 下载 </el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
    </el-card>

  </div>
</template>

<script src="./index.js"></script>

<style>

.block {
  padding: 10px 0px;
}

</style>
